package com.lovegu.thread;

/**
 * @author 老顾
 * @title: TestReComeIn
 * @projectName java-restudy
 * @email: 1437594522@qq.com
 * @date 2022/9/23 10:57
 */
public class TestReComeIn {
    private static final Object M1 = new Object();
    private static final Object M2 = new Object();
    public static void main(String[] args) {
        new Thread(() -> {
            synchronized (M1){
                synchronized (M2){
                    synchronized (M1){
                        synchronized (M2){

                            System.out.println("hello lock");
                        }
                    }
                }
            }
        }).start();
    }
}
